package overloading;

class Calculator {
	public int plus(int a, int b, int c) {
		int result = a + b + c;
		return result;
	}

	public int plus(int a, int b) {
		int result = a + b;
		return result;
	}

	public int plus(int a, int b, int c, int d) {
		int result = a + b + c + d;
		return result;
	}

	public double plus(double a, double b) {
		double result = a + b;
		return result;
	}

	public void plus(long a, int b) {
		long result = a + b;
		System.out.println(result);

	}

}

public class CalculatorTest {
	public static void main(String[] args) {

		Calculator c = new Calculator();
		int result1 = c.plus(10, 20, 30);
		System.out.println(result1);

		int result2 = c.plus(30, 70);
		System.out.println(result2);

		int result3 = c.plus(30, 50, 47, 90);
		System.out.println(result3);

		double result4 = c.plus(302.5, 30);
		System.out.println(result4);

		c.plus(20L, 50);
	}
}
